package com.byb.server.service.mapper;

import com.byb.server.domain.ProductDetails;
import com.byb.server.domain.Rate;
import com.byb.server.service.dto.ProductDetail;
import com.byb.server.service.dto.Product_sort;
import org.mapstruct.Mapper;

/**
 * Mapper for the entity Rate and its DTO Product_sort.
 */
@Mapper(componentModel = "spring", uses = {WordKeyMapper.class, })
public interface ProductDetailMapper extends  EntityMapper<ProductDetail,ProductDetails> {


    ProductDetail toDto(ProductDetails productDetails);

    default ProductDetails fromId(Long id) {
        if (id == null) {
            return null;
        }
        ProductDetails product = new ProductDetails();
        product.setId(id);
        return product;
    }
}
